#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <unistd.h>
#include <fcntl.h>
#include "errsys.h"

union A
{
	short s;
	unsigned char c1;
	unsigned char c2;
};

int main(int argc, char **argv)
{
	union A test;
	test.s=0x0102;
	if(test.c1==0x01)
		printf("little endian\n");
	if(test.c1==0x02)
		printf("big endian\n");

	return 0;
}

